package com.woniuxy.carlife.carlifeuserweb.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.woniuxy.carlife.carlifecommonsweb.exception.CarlifeGlobalException;
import com.woniuxy.carlife.carlifeuserweb.entity.Province;
import com.woniuxy.carlife.carlifeuserweb.mapper.CityMapper;
import com.woniuxy.carlife.carlifeuserweb.mapper.ProvinceMapper;
import com.woniuxy.carlife.carlifeuserweb.mapper.RegionMapper;
import com.woniuxy.carlife.carlifeuserweb.service.ProvinceService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author zjq
 * @ClassName:ProvinceServiceImpl
 * @Description:省
 * @date 2021/4/6 20:02
 **/

@Service
public class ProvinceServiceImpl extends ServiceImpl<ProvinceMapper, Province> implements ProvinceService {

    @Resource
    ProvinceMapper provinceMapper;


    /*
     * 功能描述〈查询省〉
     * @author:zjq
     * @param:
     * @return:
     * @Date 2021/4/12 15:10
     * @throws
     */

    @Override
    public List<Province> findProvince()  {
        QueryWrapper<Province> provinceQueryWrapper = new QueryWrapper<>();
        List<Province> provinces = provinceMapper.selectList(provinceQueryWrapper);

        return provinces==null?null:provinces;
    }
}
